<div align="center">
    <p><b>Localizar Irm&atilde;o</b></p>
<form id="cadastraNovoIrmao">
<table>
    <tr><td>Matr&iacute;cula:</td><td><input type="text" id="matriculaIrmao"  size="10" maxlength="7" /></td>
        <td>Nome:</td><td><input type="text" id="nomeIrmao"  size="30" maxlength="3" /></td>
        <td>
            <a href="#" id="lnkLocalizarIrmao"  onclick="localizaIrmao(<?= $alunoId ?>)">
                <img src="<?php echo base_url() . 'assets/images/ico_view.png' ?>" />
            </a>
        </td>
    </tr>
</table>
<div id="dadosIrmao"> </div>  
</form>
</div>

<script>
    
    function localizaIrmao(alunoId){
        
        var matriculaIrmao = jQuery('input[id="matriculaIrmao"]').val();
        var nomeIrmao = jQuery('input[id="nomeIrmao"]').val();
        
        jQuery.ajax( {
                type: "POST",
                url: '?c=c_aluno&m=buscaIrmao',
                cache: false,
                data: {matriculaIrmao:matriculaIrmao,
                    nomeIrmao:nomeIrmao,
                    alunoId:alunoId
                },
                beforeSend: function (){
                    $('#div_body').addClass("div_carregando");
                },
                complete:  function(){
                    $('#div_body').removeClass("div_carregando");
                },
                success: function(data){

                    if(data.length >0) {
                        //$('#suggestions').show();
                        $('#dadosIrmao').html(data);
                    }
                }
            });
        
    }
    
</script>    